Skip to content

Conversation

siverne
Copy link
Member

@siverne siverne commented Nov 25, 2026 •

Closes #109

What
The backend listens on 127.0.0.1 instead of all network interfaces, so port 3001 can no longer be reached from outside the VM. The API is still available through Apache at /project2/graphql.

Why nothing else changes
Apache (ProxyPass), scripts/deploy.sh and docs/vm.md already use 127.0.0.1:3001.

Tests

  • npm run check passes.
  • Locally: the frontend reaches the backend through the Vite proxy, and localhost:3001/graphql still opens Apollo Sandbox.
  • After deploy: curl http://it2810-18.idi.ntnu.no:3001/graphql from another machine should fail, and the site should still work.

Note
The backend not restarting is solved in #140: the deploy script now installs the systemd service.

@siverne siverne requested a review from a team as a code owner November 25, 2026 12:39
@siverne siverne linked an issue Nov 25, 2026 that may be closed by this pull request
2 tasks
Copy link
Member

@williasc williasc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally: the API answers on 127.0.0.1 and through the Vite proxy, and is refused on the network address. npm run check passes. Port 3001 on the VM still answers from outside, so this needs a deploy after merge.

@williasc williasc merged commit 3d1277e into main Nov 25, 2026
@williasc williasc deleted the 109-close-port-3001-from-outside-the-vm branch November 25, 2026 13:28
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close port 3001 from outside the VM
2 participants